<!--
 * @Author: DaHuaZhuXi
 * @Date: 2021-01-13 14:29:50
 * @LastEditTime: 2021-01-13 20:33:42
 * @LastEditors: DaHuaZhuXi
 * @Description: 所有状态小图标
-->

<template>
  <div class="status">
    <i
      v-for="item in buffsList"
      :key="item.id"
      :class="['iconfont', 'icon-' + item.icon, 'class' + item.class]"
    ></i>
  </div>
</template>
<script>
import { o2o } from '@/class/Tool.js';
export default {
  components: {},
  props: ["buffs"],
  computed: {
    buffsList() {
      let ary = [];
      this.buffs.forEach(id => {
        let o = data.buffs.find(e => e.id == id);
        if (!o) return;
        let buff = o2o(o);
        ary.push(buff);
      })
      return ary
    },
  },
}
</script>

<style lang="scss" scoped>
.status {
  position: absolute;
  right:0;
  bottom:105%;
  line-height: 12px;
  font-size: 0;
  text-align: right;
  .iconfont {
    font-size: 12px;
    transform: scale(.8);
    margin-left:2px;
    vertical-align: top;
    display: inline-block;
    background: green;
    // border-radius: 100px;
    color: #fff !important;
  }
  .class2{
    background: red;
  }
}
</style>